package com.nuo.backend.modules.security.controller;

import java.util.Arrays;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.nuo.backend.modules.security.entity.SecLogEntity;
import com.nuo.backend.modules.security.service.SecLogService;
import com.nuo.backend.common.utils.PageUtils;
import com.nuo.backend.common.utils.R;



/**
 * 系统日志
 *
 * @author nuo
 * @email 3033616351@qq.com
 * @date 2022-12-04 01:55:55
 */
@RestController
@RequestMapping("sec/log")
public class SecLogController {
    @Autowired
    private SecLogService secLogService;

    /**
     * 列表
     * @PreAuthorize("hasRole('root')")
     * @PreAuthorize("hasAuthority('sec:log:list')")
     */
    @RequestMapping("/list")
    public R list(@RequestParam Map<String, Object> params){
        PageUtils page = secLogService.queryPage(params);
        return R.ok().put("page", page);
    }

}
